#include <math.h>

float K (float k) { // First Elliptic Integral
             
		float k1 = 1 - pow(k,2);
		
		
          return (((((((((1.393087857006647*0.0001*k1+
2.296634898396959*0.001)*k1+
8.003003980649985*0.001)*k1+
9.848929322176894*0.001)*k1+6.847909282624505*0.001)*k1+
6.179627446053318*0.001)*k1+8.789801874555065*0.001)*k1+
1.493801353268717*0.01)*k1+3.088514627130519*0.01)*k1+
9.657359028085626*0.01)*k1+1.386294361119891
-
(log(k1))*((((((((((2.970028096655561*0.00001*k1+
9.215546349632498*0.0001)*k1+5.973904299155429*0.001)*k1+
1.553094163197720*0.01)*k1+2.393191332311079*0.01)*k1+
3.012484901289893*0.01)*k1+3.737773975862360*0.01)*k1+
4.882804190686240*0.01)*k1+7.031249973903835*0.01)*k1+
0.1249999999999081)*k1+0.5);

};

float E (float k) { // Second elliptic integral
    
  
	       float k1 = 1 - pow(k,2);
	
     return (((((((((1.494662175718133*0.0001*k1+
2.468503330460723*0.001)*k1+8.638442173604074*0.001)*k1+
1.077063503986646*0.01)*k1+7.820404060959554*0.001)*k1+
7.595093422559432*0.001)*k1+1.15695957452954*0.01)*k1+
2.183181167613048*0.01)*k1+5.680519456755916*0.01)*k1+
4.431471805608895*0.1)*k1 + 1.
-log(k1)*((((((((((
3.185919565550157*0.00001)*k1+9.898332846225385*0.0001)*k1+
6.432146586438302*0.001)*k1+1.680402334636338*0.01)*k1+
2.614501470031388*0.01)*k1+3.347894366576163*0.01)*k1+
4.27178905473831*0.01)*k1+5.859366125553149*0.01)*k1+
9.374999972120314*0.01)*k1+0.2499999999999018)*k1;
};

